import { Module } from '@nestjs/common';
import {TypeOrmModule} from '@nestjs/typeorm';
import {AuthController} from './auth.controller';
import {AuthService} from './auth.service';
import { JwtModule } from '@nestjs/jwt';
import { User } from '../user/entities/user.entity';
import {Menu} from '../menu/entities/menu.entity';
import { SysRoleWithMenuEntity } from '../role/entities/role.menu.entity';
import { SysUserWithRoleEntity } from '../user/entities/user.role.entity'
@Module({
    imports: [
        TypeOrmModule.forFeature([User,Menu,SysRoleWithMenuEntity,SysUserWithRoleEntity]),
        // JwtModule.registerAsync({
        //   imports: [ConfigModule],
        //   useFactory: async (config: ConfigService) => ({
        //     secret: config.get('jwt.secretkey'),
        //   }),
        //   inject: [ConfigService],
        // }),
      ],
      controllers: [AuthController],
      providers: [AuthService],
      exports: [AuthService],
})
export class AuthModule {
    
}
